package eclipse.lib.graphics;
/**
 * Shader for a quad object
 */
public class GLQuadShader 
{
	private GLColor ptopLeft;
	private GLColor ptopRight;
	private GLColor pbottomLeft;
	private GLColor pbottomRight;
	/**
	 * Creates a quad shader from a specific color
	 * @param fColor Solid color to use
	 */
	public GLQuadShader(GLColor fColor)
	{
		ptopLeft = fColor;
		ptopRight = fColor;
		pbottomLeft = fColor;
		pbottomRight = fColor;
	}
	/**
	 * Creates a quad shader from four colors
	 * @param tLeft Top Left color
	 * @param tRight Top Right color
	 * @param bLeft Bottom left color
	 * @param bRight Bottom Right color
	 */
	public GLQuadShader(GLColor tLeft, GLColor tRight, GLColor bLeft, GLColor bRight)
	{
		ptopLeft = tLeft;
		ptopRight = tRight;
		pbottomLeft = bLeft;
		pbottomRight = bRight;
	}
	/**
	 * Sets the top left color 
	 * @param tLeft Top Left color
	 */
	public void setTopLeft(GLColor tLeft)
	{
		ptopLeft = tLeft;
	}
	/**
	 * Sets the top right color
	 * @param tRight Top Right color
	 */
	public void setTopRight(GLColor tRight)
	{
		ptopRight = tRight;
	}
	/** 
	 * Sets the bottom left color
	 * @param bLeft Bottom left color
	 */
	public void setBottomLeft(GLColor bLeft)
	{
		pbottomLeft = bLeft;
	}
	/**
	 * Sets the bottom right color
	 * @param bRight Bottom right color
	 */
	public void setBottomRight(GLColor bRight)
	{
		pbottomRight = bRight;
	}
	/** Returns the top left color */
	public GLColor getTopLeft()
	{
		return ptopLeft;
	}
	/** Returns the top right color */
	public GLColor getTopRight()
	{
		return ptopRight;
	}
	/** Returns the bottom left color */
	public GLColor getBottomLeft()
	{
		return pbottomLeft;		
	}
	/** Returns the bottom right color */
	public GLColor getBottomRight()
	{
		return pbottomRight;
	}
}
